package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.TlPddTokenMapper;
import com.ruoyi.system.domain.TlPddToken;
import com.ruoyi.system.service.ITlPddTokenService;

/**
 * 拼多多授权Service业务层处理
 *
 * @author ruoyi
 * @date 2023-11-07
 */
@Service
public class TlPddTokenServiceImpl implements ITlPddTokenService
{
    @Autowired
    private TlPddTokenMapper tlPddTokenMapper;

    /**
     * 查询拼多多授权
     *
     * @param id 拼多多授权主键
     * @return 拼多多授权
     */
    @Override
    public TlPddToken selectTlPddTokenById(Long id)
    {
        return tlPddTokenMapper.selectTlPddTokenById(id);
    }

    /**
     * 查询拼多多授权列表
     *
     * @param tlPddToken 拼多多授权
     * @return 拼多多授权
     */
    @Override
    public List<TlPddToken> selectTlPddTokenList(TlPddToken tlPddToken)
    {
        return tlPddTokenMapper.selectTlPddTokenList(tlPddToken);
    }

    /**
     * 新增拼多多授权
     *
     * @param tlPddToken 拼多多授权
     * @return 结果
     */
    @Override
    public int insertTlPddToken(TlPddToken tlPddToken)
    {
        return tlPddTokenMapper.insertTlPddToken(tlPddToken);
    }

    /**
     * 修改拼多多授权
     *
     * @param tlPddToken 拼多多授权
     * @return 结果
     */
    @Override
    public int updateTlPddToken(TlPddToken tlPddToken)
    {
        return tlPddTokenMapper.updateTlPddToken(tlPddToken);
    }

    /**
     * 批量删除拼多多授权
     *
     * @param ids 需要删除的拼多多授权主键
     * @return 结果
     */
    @Override
    public int deleteTlPddTokenByIds(Long[] ids)
    {
        return tlPddTokenMapper.deleteTlPddTokenByIds(ids);
    }

    /**
     * 删除拼多多授权信息
     *
     * @param id 拼多多授权主键
     * @return 结果
     */
    @Override
    public int deleteTlPddTokenById(Long id)
    {
        return tlPddTokenMapper.deleteTlPddTokenById(id);
    }

    @Override
    public TlPddToken selectTlPddTokenByUserId(Long userId) {
        return tlPddTokenMapper.selectTlPddTokenByUserId(userId);
    }

    @Override
    public TlPddToken selectTlPddTokenByUserIdAndoWnerId(String WnerId) {
        return tlPddTokenMapper.selectTlPddTokenByUserIdAndoWnerId(WnerId);
    }
}
